package com.kymatrix.mpo.plus.bpm.server.model.form.instance;

import com.kymatrix.mpo.plus.common.business.common.BasePageReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
import javax.validation.constraints.NotEmpty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import static com.kymatrix.mpo.plus.common.constants.Constant.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;


@ApiModel(value = "管理后台 - 流程实例分页 Request")
@Data
@Accessors(chain=true)
public class PageQueryBpmProcessInstanceReq extends BasePageReq {

    @ApiModelProperty(value = "流程名称", example = "zhangsan")
    private String name;

    @ApiModelProperty(value = "流程定义的编号", example = "2048")
    private String processDefinitionId;

    @ApiModelProperty(value = "流程实例的状态 BpmProcessInstanceStatus", example = "1")
    @NotEmpty(message = "状态不能为空")
    private String status;

    @ApiModelProperty(value = "流程分类", example = "1")
    private String category;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    @ApiModelProperty(value = "发起用户编号", example = "1024")
    private String startUserId; // 注意，只有在【流程实例】菜单，才使用该参数

}
